-- light_form
-- created by zhuangsl
-- 皇后冈布奥，光明形态

return {
    fetchProps = function(who, status, condition)
        local props  = {};
        local endRound = condition["end_round"];

        -- 魔力提升
        local propId = PropM.getPropId("attrib");
        local value  = condition["value"];
        table.insert(props, { propId, "magic", value, endRound, });

        -- 攻击降低30%
        propId = PropM.getPropId("curse");
        table.insert(props, { propId, 1, 300, endRound, });

        -- 学会主动技
        propId = PropM.getPropId("gain_slime_skill");
        local level = condition["level"] or 1;
        table.insert(props, { propId, 27, level, endRound, });

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 攻击百分比提升
        local value = condition["value"];
        value = math.modf(value / 10);
        desc = string.gsub(desc, "{value}", value);

        return desc;
    end,

    fireEvent = function(target, status, condition, eventType)
        if eventType == "apply" then
            EventMgr.fire(event.NEED_REFRESH_ATTRIB, {});
        end
    end
};
